@rem first, we need to register the smart tag with Office

regedt32 /s RegWordReporterST.reg

@rem next, we need to set up security policy to allow the managed code to be loaded
@rem - polchgprompt - Enables or disables the prompt that is displayed whenever Caspol.exe is run using an option that would cause policy changes.
@rem - user - specifies adding the new code group at user policy level.
@rem - addgroup - Adds a new code group to the code group hierarchy.
@rem - url - Specifies code that originates from the given URL. 
@rem - name - specifies the scripting name for a code group to add. 

CD %windir%\microsoft.net\framework\v1.1.4322

caspol.exe -polchgprompt off -user -addgroup 1 -allcode Nothing -name "WordReporter_SmartTag" -user -addgroup WordReporter_SmartTag -url "file://C:/PATH_TO_WORDREPORTER_EXTENSION/WordReporterST/*" FullTrust -name "WordReporter Smart Tag"
caspol.exe -polchgprompt on
@rem Pause
